<?php 
$conn = mysql_connect("127.0.0.1","root","");
mysql_select_db("xingtan");
$name = mysql_real_escape_string($_GET['n']);
$id = mysql_real_escape_string($_GET['id']);
$title = mysql_real_escape_string($_GET['t']);
$sql = sprintf("INSERT INTO categories (id, name, title) VALUES (%s, '%s', '%s')", $id, $name, $title);
if ($title && $name) {
  mysql_query($sql);
  print 'insert ok : ' . $result;
} else {
  print 'para error';
}
mysql_close($conn);
?>
